import request from '@/utils/request'

// 新增套餐
export function addPrice(data) {
  return request({
    url: '/admin-api/door/dept/price',
    method: 'post',
    data: data
  })
}

// 获取套餐列表
export function listPrice(deptId) {
  return request({
    url: `/admin-api/door/dept/price/${deptId}`,
    method: 'get'
  })
}

// 修改套餐
export function updatePrice(data) {
  return request({
    url: '/admin-api/door/dept/price',
    method: 'put',
    data: data
  })
}

// 删除套餐
export function delPrice(deptId) {
  return request({
    url: '/admin-api/door/dept/price/delete',
    method: 'get',
    params: { deptId:deptId }
  })
}

// 获取套餐plan列表
export function listPlan(params) {
  return request({
    url: '/admin-api/door/plan/list',
    method: 'get',
    params
  })
}

// 新增套餐plan
export function addPlan(data) {
  return request({
    url: '/admin-api/door/plan',
    method: 'post',
    data
  })
}

// 修改套餐plan
export function updatePlan(data) {
  return request({
    url: '/admin-api/door/plan',
    method: 'put',
    data
  })
}

// 获取套餐plan详情
export function getPlan(id) {
  return request({
    url: `/admin-api/door/plan/${id}`,
    method: 'get'
  })
}
